package com.zhen;

import com.zhen.domain.User;
import com.zhen.factory.FKSqlSessionFactory;
import com.zhen.mapper.UserMapper;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class SelectAllTest {

    public static void main(String[] args) {
        SqlSession session = FKSqlSessionFactory.getSqlSession();

        UserMapper userMapper = session.getMapper(UserMapper.class);

        List<User> userList = userMapper.selectAllUser();
        userList.forEach(user -> System.out.println(user));
        session.commit();
        session.close();
    }

}
